home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1990 May / 1990-05.d64 / ml programming (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  519b  |  25 lines

  1. 5 print"[147][154]":poke53280,14:poke53281,6
  2. 10 print"this program reads the restore key by"
  3. 20 print"changing the non-maskable interrupt"
  4. 30 print"vector. press restore for count or "
  5. 40 print"run/stop to exit."
  6. 100 data 238,96,3,76
  7. 110 for j=828 to 831
  8. 120 read x:poke j,x:next j
  9. 130 poke 832,peek(792)
  10. 140 poke 833,peek(793)
  11. 150 poke 792,60:poke 793,3
  12. 160 x=peek(864)
  13. 170 y=peek(864)
  14. 180 if x=y goto220
  15. 190 n=n+1
  16. 200 x=x+1:if x=256 then x=0
  17. 210 goto170
  18. 220 if n=n0 goto250
  19. 230 n0=n
  20. 240 print n;"restore presses seen"
  21. 250 get k$:if k$="" goto170
  22. 260 poke 792,peek(832)
  23. 270 poke 793,peek(833)
  24. 280 print "program ended."
  25.